home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / editors / AME / Rexx / testext.ame < prev    next >
Encoding:
Text File  |  1994-02-01  |  679 b   |  35 lines

  1. /* $VER: testext 37.1 (21.2.93) */ 
  2. /* Program to demonstrate the AME externally controlled buffer */
  3.  
  4. if (~show('L','rexxsupport.library')) then do
  5.     addlib('rexxsupport.library',0,-30,0)
  6.     end
  7.  
  8. 'setprefs' eport WEDGEPORT
  9. 'setprefs' ext
  10. mp = openport(WEDGEPORT)
  11.  
  12. do forever
  13.    if quitflag = 1 then leave
  14.    t = waitpkt(WEDGEPORT)
  15.  
  16.    do ff = 1
  17.      p = getpkt(WEDGEPORT)
  18.     if c2d(p) = 0 then leave ff
  19.       line = getarg(p)
  20.  
  21.     parse var line command code f n .
  22.     k= x2d(code)
  23.     if code = 71 then quitflag = 1
  24.     else do
  25.         if ((k > 64) & (k < 91)) | ((k > 96) & (k < 123)) then k = k+1
  26.         'executekey' f n k
  27.         end
  28.     t=reply(p,0)
  29.     end
  30.     end
  31.  
  32. 'unsetprefs' ext
  33. 'unsetprefs' EPORT
  34.  
  35.